package com.ymtms.supplycar.dao;

import com.ymtms.supplycar.pojo.GoodsbillMaster;
import com.ymtms.supplycar.pojo.Waybill;
import com.ymtms.supplycar.vo.GridRequest;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface WaybillMapper {
    int deleteByPrimaryKey(Integer wid);

    int insert(Waybill record);

    int insertSelective(Waybill record);

    Waybill selectByPrimaryKey(Integer wid);

    int updateByPrimaryKeySelective(Waybill record);

    int updateByPrimaryKey(Waybill record);

    List<Waybill> selectAll(Integer begin, Integer end,String contractCode,String date);

    int selectCount();

    @Update("update waybill set flag=1 where wid = #{id}")
    int updateFlag(Integer id);

    // 根据货运单编号gmid查询相应的运输单
    @Select("SELECT * FROM waybill WHERE goods_billpkid = #{gmid}")
    Waybill selectWaybillByGmid(Integer gmid);


}